package com.goat.train.member.controller;

import com.goat.train.common.respond.CommonResp;
import com.goat.train.member.req.MemberRegisterReq;
import com.goat.train.member.service.MemberService;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/member")
public class MemberController {
    @Resource
    private MemberService memberService;

    @RequestMapping("/test")
    public Long test() {
        return memberService.test();
    }

    @RequestMapping("/register")
    public CommonResp<Long> register(@Valid MemberRegisterReq req) {
        return memberService.register(req);
    }
}
